package learning.byteStream;

import java.io.ByteArrayInputStream;

public class ByteArrInputStream1 {
	public static void main(String[] args) {
		String str="hello everyone";
		byte[] by=str.getBytes();
		ByteArrayInputStream bats=new ByteArrayInputStream(by);
		try {
			int b=0;
			while((b=bats.read())!=-1){
				System.out.print((char)b);
				
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
